<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <title>ztree</title>
    <!--<link rel="stylesheet" href="plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <script type="text/javascript" src="plugins/ztree/js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="plugins/ztree/js/jquery.ztree.core-3.5.js"></script>
    <script type="text/javascript" src="plugins/ztree/js/jquery.ztree.excheck-3.5.js"></script>-->
    <script src="plugins/ztree/js/jquery-1.4.4.min.js"></script>
    <script src="plugins/ztree/js/jquery.ztree.all-3.5.js"></script>
    <link rel="stylesheet" href="plugins/ztree/css/zTreeStyle/zTreeStyle.css">
    <script language="JavaScript">
        var zTreeObj;
        // zTree 的参数配置，深入使用请参考 API 文档（setting 配置详解）
        var setting = {
            data: {
                simpleData: {
                    enable: true,
                    idKey: "id",
                    pIdKey: "pId",
                    rootPId: 0
                }
            }
        };
        // zTree 的数据属性，深入使用请参考 API 文档（zTreeNode 节点数据详解）
        var zNodes = [
            {id:"1",pId:"0",name:"wp"},
            {id:"11",pId:"1",name:"wp"},
            {id:"12",pId:"1",name:"wp"},
            {id:"121",pId:"12",name:"wp"},
            {id:"122",pId:"12",name:"wp"},
            {id:"2",pId:"0",name:"wp"},
            {id:"21",pId:"2",name:"wp"},
            {id:"22",pId:"2",name:"wp"}
            /*{name:"王朋", open:true, children:[
                    {name:"宋爽"}, {name:"爽gei~",open:true,children:[
                            {name:"小宋"}
                        ]}]},
            {name:"王昊", open:true, children:[
                    {name:"giao爽"}, {name:"爽儿"}]}*/
        ];
        $(document).ready(function(){
            zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, zNodes);
        });
    </script>
</head>
<body>
<div>
    <ul id="treeDemo" class="ztree"></ul>
</div>
</body>
</html>